﻿using System.Data;
using System.Data.SqlClient;
using LoverMeeting.Model.Entity;

namespace LoverMeeting.DataBase.DataMappers
{
    public class CityMapper : IDataMapper<City>
    {
        public City GetData(IDataReader reader)
        {
            var entity = new City
                           {
                               Id = int.Parse(reader["CityId"].ToString()),
                               Name = reader["CityName"].ToString()
                           };
            return entity;
        }

        public void SetParameter(SqlCommand command, City entity)
        {
            throw new System.NotImplementedException();
        }

        public int GetRecordCount(IDataReader reader)
        {
            throw new System.NotImplementedException();
        }
    }
}
